package com.iris.live.services.services;

import com.iris.live.services.data.models.CustomCarConfigureDetailModel;
import com.iris.live.services.requestbody.CustomCarConfigureDetailBody;
import com.iris.live.services.vo.aftermarket.QuoteAfterSalesInfo;
import com.iris.live.services.vo.customcarconfigure.CustomConfigureDetailPreviewVo;

import java.util.List;
import java.util.Map;

/**
 *
 */
public interface ICustomCarConfigureDetailService {

    /**
     * 根据加配ID、状态查询详情信息
      * @param customCarId
     * @param status
     * @return
     */
    List<CustomCarConfigureDetailModel> findByCustomCarId(Integer customCarId, Integer status);

    /**
     * 根据库存ID、状态查询详情信息
     * @param storeId
     * @param status
     * @return
     */
    List<Map<String,String>> findListByStoreId(String storeId, Integer status);

    /**
     * 批量新增
     * @param list
     * @param storeIds
     */
    void insertBatch(List<CustomCarConfigureDetailBody.DetailBody> list, String storeIds);

    /**
     * 更新加配信息
     * @return
     * @throws Exception
     */
    void update(CustomCarConfigureDetailBody.DetailBody model, Integer detailId);

    /**
     * 删除加配信息（有可能触发级联更改基本状态）
     * @param storeId
     * @param detailId
     */
    void deleteFalse(String storeId, String detailId, String permit);

    /**
     * 当前库存是否能预装
     * @param storeId
     * @return
     */
    boolean isConfigure(Integer storeId);

    /**
     * 当前库存的预装精品列表
     * @param vin
     * @return
     */
    List<QuoteAfterSalesInfo> getCarConfigureAfterMarket(String vin,String permit);

    /**
     * 根据库存ID、状态查询详情信息
     * @param vin
     * @param status
     * @return
     */
    List<CustomConfigureDetailPreviewVo> findMarketByVin(String vin, Integer status);

}
